package com.qiguliuxing.dts.admin.api;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import javax.servlet.MultipartConfigElement;

@SpringBootApplication(scanBasePackages = { "com.qiguliuxing.dts.db", "com.qiguliuxing.dts.core",
		"com.qiguliuxing.dts.admin" })
@MapperScan({ "com.qiguliuxing.dts.db.dao", "com.qiguliuxing.dts.db.dao.ex" })
@EnableTransactionManagement
@EnableScheduling
public class Application {

	public static void main(String[] args) {
		SpringApplication.run(Application.class, args);
	}
//	@Value（"${file.uploadFolder}"）
//	private String uploadFolder;
//
//	@Bean
//	MultipartConfigElement multipartConfigElement(){
//		MultipartConfigFactory factory = new MultipartConfigFactory();
//		factory.setLocation(uploadFolder);
//		factory.setMaxFileSize("10MB");
//		// 设置总上传数据总大小
//		factory.setMaxRequestSize("10MB");
//		return factory.createMultipartConfig();
//	}
}